package pers.brozen.anka.support.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import pers.brozen.anka.support.wechat.WeChatMiniProgramAPI;

/**
 * @author Brozen
 * @since 2024-05-28
 */
@Configuration
public class WechatApiConfiguration {

    @Value("${anka.wechat.mini-program.id}")
    private String miniProgramAppId;

    @Value("${anka.wechat.mini-program.secret}")
    private String miniProgramAppSecret;


    @Bean
    public WeChatMiniProgramAPI weChatMiniProgram() {
        return new WeChatMiniProgramAPI(miniProgramAppId, miniProgramAppSecret);
    }

}
